package com.esun.server.config;


import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


/**
 * 跨越请求设置
 *
 * @author xiaoliebin
 */
// @Configuration
public class CorsConfig implements WebMvcConfigurer {
	@Override
	public void addCorsMappings(CorsRegistry registry) {
		registry.addMapping("/**")
				.allowedOrigins("*")
//				.allowedHeaders("*")
				.allowCredentials(true)
				.allowedMethods("*")
				.maxAge(3600);
	}
}
